home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.0 / stk-3 / blt-for-STk-3.0 / blt-1.9 / src / bltInit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-03  |  3.9 KB  |  154 lines

  1. /*
  2.  * bltInit.c --
  3.  *
  4.  * Copyright 1993-1994 by AT&T Bell Laboratories.
  5.  * Permission to use, copy, modify, and distribute this software
  6.  * and its documentation for any purpose and without fee is hereby
  7.  * granted, provided that the above copyright notice appear in all
  8.  * copies and that both that the copyright notice and warranty
  9.  * disclaimer appear in supporting documentation, and that the
  10.  * names of AT&T Bell Laboratories any of their entities not be used
  11.  * in advertising or publicity pertaining to distribution of the
  12.  * software without specific, written prior permission.
  13.  *
  14.  * AT&T disclaims all warranties with regard to this software, including
  15.  * all implied warranties of merchantability and fitness.  In no event
  16.  * shall AT&T be liable for any special, indirect or consequential
  17.  * damages or any damages whatsoever resulting from loss of use, data
  18.  * or profits, whether in an action of contract, negligence or other
  19.  * tortuous action, arising out of or in connection with the use or
  20.  * performance of this software.
  21.  *
  22.  */
  23.  
  24. #include <tcl.h>
  25.  
  26. #ifndef BLT_VERSION
  27. #define BLT_VERSION "1.8"
  28. #endif
  29.  
  30. /*
  31.  * The inclusion of contributed commands/widgets can be suppressed by
  32.  * defining the respective preprocessor symbol.
  33.  */
  34.  
  35. #ifndef NO_HTEXT
  36. EXTERN int Blt_HtextInit _ANSI_ARGS_((Tcl_Interp *interp));
  37. #endif
  38. #ifndef NO_GRAPH
  39. EXTERN int Blt_GraphInit _ANSI_ARGS_((Tcl_Interp *interp));
  40. #endif
  41. #ifndef NO_BARCHART
  42. EXTERN int Blt_BarchartInit _ANSI_ARGS_((Tcl_Interp *interp));
  43. #endif
  44. #ifndef NO_TABLE
  45. EXTERN int Blt_TableInit _ANSI_ARGS_((Tcl_Interp *interp));
  46. #endif
  47. #ifndef NO_BUSY
  48. EXTERN int Blt_BusyInit _ANSI_ARGS_((Tcl_Interp *interp));
  49. #endif
  50. #ifndef NO_WINDOW
  51. EXTERN int Blt_WindowInit _ANSI_ARGS_((Tcl_Interp *interp));
  52. #endif
  53. #ifndef NO_BITMAP
  54. EXTERN int Blt_BitmapInit _ANSI_ARGS_((Tcl_Interp *interp));
  55. #endif
  56. #ifndef NO_BGEXEC
  57. EXTERN int Blt_BgExecInit _ANSI_ARGS_((Tcl_Interp *interp));
  58. #endif
  59. #ifndef NO_DRAGDROP
  60. EXTERN int Blt_DragDropInit _ANSI_ARGS_((Tcl_Interp *interp));
  61. #endif
  62. #ifndef NO_DEBUG
  63. EXTERN int Blt_DebugInit _ANSI_ARGS_((Tcl_Interp *interp));
  64. #endif
  65. #ifndef NO_WATCH
  66. EXTERN int Blt_WatchInit _ANSI_ARGS_((Tcl_Interp *interp));
  67. #endif
  68. #ifndef NO_BELL
  69. EXTERN int Blt_BellInit _ANSI_ARGS_((Tcl_Interp *interp));
  70. #endif
  71. #ifndef NO_CUTBUFFER
  72. EXTERN int Blt_CutbufferInit _ANSI_ARGS_((Tcl_Interp *interp));
  73. #endif
  74.  
  75. int
  76. Blt_Init(interp)
  77.     Tcl_Interp *interp;        /* Interpreter to add extra commands */
  78. {
  79.     char *libDir;
  80.  
  81.     libDir = Tcl_GetVar2(interp, "env", "BLT_LIBRARY", TCL_GLOBAL_ONLY);
  82.     if (libDir == NULL) {
  83.     libDir = BLT_LIBRARY;
  84.     }
  85.     Tcl_SetVar2(interp, "blt_library", (char *)NULL, libDir, TCL_GLOBAL_ONLY);
  86. #ifndef NO_HTEXT
  87.     if (Blt_HtextInit(interp) != TCL_OK) {
  88.     return TCL_ERROR;
  89.     }
  90. #endif
  91. #ifndef NO_GRAPH
  92.     if (Blt_GraphInit(interp) != TCL_OK) {
  93.     return TCL_ERROR;
  94.     }
  95. #endif
  96. #ifndef NO_BARCHART
  97.     if (Blt_BarchartInit(interp) != TCL_OK) {
  98.     return TCL_ERROR;
  99.     }
  100. #endif
  101. #ifndef NO_TABLE
  102.     if (Blt_TableInit(interp) != TCL_OK) {
  103.     return TCL_ERROR;
  104.     }
  105. #endif
  106. #ifndef NO_BUSY
  107.     if (Blt_BusyInit(interp) != TCL_OK) {
  108.     return TCL_ERROR;
  109.     }
  110. #endif
  111. #ifndef NO_WINDOW
  112.     if (Blt_WindowInit(interp) != TCL_OK) {
  113.     return TCL_ERROR;
  114.     }
  115. #endif
  116. #ifndef NO_DRAGDROP
  117.     if (Blt_DragDropInit(interp) != TCL_OK) {
  118.     return TCL_ERROR;
  119.     }
  120. #endif
  121. #ifndef NO_BELL
  122.     if (Blt_BellInit(interp) != TCL_OK) {
  123.     return TCL_ERROR;
  124.     }
  125. #endif
  126. #ifndef NO_CUTBUFFER
  127.     if (Blt_CutbufferInit(interp) != TCL_OK) {
  128.     return TCL_ERROR;
  129.     }
  130. #endif
  131. #ifndef NO_BITMAP
  132.     if (Blt_BitmapInit(interp) != TCL_OK) {
  133.     return TCL_ERROR;
  134.     }
  135. #endif
  136. #ifndef NO_BGEXEC
  137.     if (Blt_BgExecInit(interp) != TCL_OK) {
  138.     return TCL_ERROR;
  139.     }
  140. #endif
  141. #ifndef NO_DEBUG
  142.     if (Blt_DebugInit(interp) != TCL_OK) {
  143.     return TCL_ERROR;
  144.     }
  145. #endif
  146. #ifndef NO_WATCH
  147.     if (Blt_WatchInit(interp) != TCL_OK) {
  148.     return TCL_ERROR;
  149.     }
  150. #endif
  151.     Tcl_SetVar2(interp, "blt_versions", "BLT", BLT_VERSION, TCL_GLOBAL_ONLY);
  152.     return TCL_OK;
  153. }
  154.